#include <func.h>

int main(int argc,char *argv[])
{
    ARGS_CHECK(argc,2)
    int fd;
    fd=open(argv[1],O_RDWR);
    int ret;
    ERROR_CHECK(fd,-1,"open")
    ret=lseek(fd,1024,SEEK_SET);//偏移1024个字节
    printf("pos=%d",ret);
    ERROR_CHECK(ret,-1,"lseek")
    write(fd,"1",1);//此时写入的信息在第1024个字节上
    close(fd);
    return 0;
}    
    